package cn.bxshey.general.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 订单(Order)表实体类
 *
 * @author makejava
 * @since 2024-02-01 00:31:58
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("order")
public class Order {
    @TableId
    //id    
    private Long orderId;

    //关联用户信息表，用户id
    private Long userId;
    //关联商品表，商品id
    private Long commodityId;
    //订单支付时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;
    //交易金额
    private Double amount;
    //订单状态，0未支付  1已支付  -1支付取消  2配送中 3交易关闭   4交易成功
    private Integer statue;
    //订单创立时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //支付方式
    private String paymentMethods;
    //订单关闭时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date closeTime;
    //订单更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //用户
    private User user;
}
